package cn.ad.service;

import cn.ad.entity.Industry;
import cn.ad.handler.SqlSessionHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IndustryService {

	@Autowired
	private SqlSessionHandler sqlSessionHandler;
	
	public List<Industry> getIndustryList() {
		return sqlSessionHandler.selectList("industryMapper.industry:list", null);
	}

	public List<Industry> getCampaignIndustryList() {
		return sqlSessionHandler.selectList("industryMapper.industry:campaign:list", null);
	}

	public String getAppClassesName(int id) {
		return sqlSessionHandler.selectOne("industryMapper.industry:appClasses:name", id);
	}
	
}
